package com.java.strategy;

public class Test {
    public static void main(String[] args) {

        AbstractPay abstractPay = PayEnum.getPayBeanByCode(PayEnum.ALIPAY.getPayPlatform());

        if (abstractPay == null){
            throw  new RuntimeException("不支持的支付方式");
        }
        abstractPay.pay();
    }
}
